import * as Types from '../constant/ActionTypes';

let nextTodoId = 0;

export const addTodo = text => ({
  type: Types.ADD_TODO,
  payload: {
    id: nextTodoId++,
    text,
  },
});

export const toggleFilter = () => ({
  type: Types.FILTER_TODO,
});

